<?php
/**
 
 Convert the labels into a Javascript array

 author: David Walker
 copyright: 2010 California State University
 version: $Id: labels.phtml 2045 2011-11-28 14:17:37Z dwalker.calstate@gmail.com $
 package: Xerxes
 link: http://xerxes.calstate.edu
 license: http://www.gnu.org/licenses/
 
*/
?>
xerxes_labels = new Array();
<?php 
	
	$labels = $this->get("labels");	
	
	foreach ( $labels->getLabels() as $name => $value )
	{
		$value = str_replace('"', '\\"', $value);
		$value = str_replace("\n", " ", $value);
		echo "xerxes_labels['$name'] = \"$value\";\n";
	}
?>